package com.yc.wxcontroller;

import cn.hutool.core.date.DateUtil;
import com.yc.entity.Notice;
import com.yc.service.NoticeService;
import com.yc.vo.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @author mqm
 * @version 1.0
 * @date 2023/7/22 17:30
 */
//@RestController
public class WxNoticeController {

    @Resource
    private NoticeService noticeService;

    @ApiOperation("所有人查询公告")
    @RequestMapping("wx/queryNotice")
    public Result queryNotice(){
        Result querynotice = noticeService.querynotice();
        return querynotice;
    }

    @ApiOperation("领导查询公告。只查询5条最新的")
    @PostMapping("wx/querynoticeByManage")
    public Result querynoticeByManage(){
        Result result = noticeService.querynoticeByManage();
        return result;
    }
}
